package com.dom.common.enums;

/**
 * @Description 通用状态枚举类
 * @Author xllei
 * @Date 2018/12/5 11:27 AM
 * @Version 1.0
 **/
public enum PubStatEnum {
    /**
     * 0:正常
     */
    STAT_NORMAL(0),
    /**
     * 1:停用
     */
    STAT_STOP(1),

    STAT_UNACTIVATED(2)
    ;

    PubStatEnum(int code){
        this.code = code;
    }

    private int code;

    public int getCode() {
        return code;
    }

    public static String getName(int code){
        return code == 1 ? "停用" : (code == 2 ? "待激活" : "正常");
    }
}
